#!/usr/bin/env python3
# -*- coding:utf-8 -*-

""" 身份认证"""

import requests

from requests.auth import HTTPBasicAuth



r = requests.get('http://localhost:5000', auth=HTTPBasicAuth('username', 'password'))
print(r.status_code)